home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Cool Demos, SDKs, & Tools / Demos⁄Tools⁄Offers / Alpha ƒ / Tcl / Completions / Tcl Tutorial.tcl < prev    next >
Text File  |  1998-04-16  |  906b  |  41 lines

  1.           Tcl Mode Completions
  2.  
  3. Use the 'back-quote' key to jump to the next completion, or just position the 
  4. cursor appropriately, and then hit the completion invoking key ('cmd-tab' 
  5. --default, 'tab' --alternative set).
  6.  
  7. (a) Here are some typical uses of electric completions:
  8.  
  9.     for◊
  10.  
  11.     while◊
  12.     
  13.     switch◊
  14.     
  15. (b) It's important spell long variable names correctly.  Notice that leading
  16. '$' signs are ignored.
  17.  
  18.     while {$myVeryLongVariableName>0} {
  19.         incr my◊
  20.     }
  21.     
  22.  
  23. (c) By pressing the invoking key multiple times, you can switch between any 
  24. number of alternative completions both above and below the insertion point.  
  25. If you cycle through all possibilities, the entire name is highlighted so 
  26. you can delete it easily if desired.
  27.  
  28.       set myOtherLongVariable 0
  29.     while {$myVeryLongVariableName>0} {
  30.         incr my◊
  31.     }
  32.  
  33.     set myVariableBelow 0.1
  34.  
  35.  
  36.     proc main {} {
  37.         # just for show
  38.         puts stdout "Hello World"
  39.         exit
  40.     }
  41.